package mysql

import "gorm.io/gorm"

type House struct {
	gorm.Model
	Title       string  `gorm:"type:varchar(100);not null;comment:房源标题"`
	Price       float64 `gorm:"type:float(10,2);not null;comment:价格"`
	Image       string  `gorm:"type:varchar(100);not null;comment:图片"`
	Mobile      string  `gorm:"type:char(11);not null;comment:手机号"`
	Description string  `gorm:"type:varchar(255);not null;comment:描述"`
	Region      string  `gorm:"type:varchar(100);not null;comment:所属地区"`
}

func (h *House) Caters() error {
	return db.Create(&h).Error
}
